1. Field of the Invention
The present invention relates to methods, computer programs and systems for online measurement of computer resource utilization, and more particularly, methods, computer programs and systems for managing thread performance in a computing environment based on its cache occupancy and performance.
2. Description of the Related Art
Operating systems, hypervisors, and other runtime systems are designed to distribute hardware resources across multiple clients with varying degrees of service levels and priorities. A hypervisor, sometimes referred to as a virtual machine monitor, is a virtualization platform that allows multiple operating systems to run on a host computer at the same time. Clients include threads, processes, applications, virtual machines, other software contexts, etc. Administrators and users manage resource allocation policies by specifying settings that aim to determine how the different clients are serviced, sometimes aimed at enforcing guaranteed service rates or service-level agreements. These policy settings may include process priorities, reservations, proportional-share weights, etc.
In order to provide effective quality of service to a client, software must first be able to measure the client's actual resource consumption accurately, as well as resource consumption by other clients in the system. One critical resource that determines client performance is the client's consumption and utilization of processor cache memory. While various techniques exist for obtaining information for resources such as processor time and main memory space, there are no known software methods for accurately estimating per-client consumption and utilization of processor cache memory. Although cache effects are critical to performance in modern systems, software typically provides little, if any, control over cache allocations. For instance, page coloring is one approach, but it is not efficient. Manual tuning works poorly because of constantly changing usage patterns. Trial-and-error techniques, even after much labor, fail to be accurate, as usage demands change constantly. Additionally, cache resource management is becoming increasingly important as modern processors typically share a common hardware cache across multiple competing hardware contexts, such as cores and hardware threads. There is a significant speed discrepancy between main memory and cache memory, the latter being clocked at processor speeds, leading to as many as several hundred processor clock cycles of stall time on cache misses. Management of a limited resource, such as an on-chip cache, is becoming increasingly important as both the number of cores, and the disparity between processor and memory speeds increase.
It is in this context that embodiments of the invention arise.